﻿/*=======================================================================================
	TASK 2:                                                                     {Methods}
	Write a method GetMax() with two parameters that returns the bigger of two integers. 
    Write a program that reads 3 integers from the console and prints the biggest of them
    using the method GetMax().
========================================================================================*/

using System;

class GetMax2Parameters3Numbers
{
    static int GetMax(int a, int b)
    {
        int max=a;
        if (b>a)
        {
            max = b;
        }
        return max;
    }

    static void Main()
    {
        Console.Write("Enter first integer:");
        int firsNumber = int.Parse(Console.ReadLine());

        Console.Write("Enter second integer:");
        int secondNumber = int.Parse(Console.ReadLine());

        Console.Write("Enter third integer:");
        int thirdNumber = int.Parse(Console.ReadLine());

        //GetMax(firsNumber, secondNumber); get bigger than first and second
        int max=GetMax(thirdNumber, GetMax(firsNumber, secondNumber));
        Console.WriteLine("The biggest number is:{0}",max);
    }
}

